/* 
 *   WWW.COO8.COM  
 */

package com.gm.memberShip.menu.model; 

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


import java.util.*;
import org.apache.commons.lang.StringUtils;
 

import com.gm.memberShip.menu.model.*;
import com.gm.memberShip.menu.persistence.interfaces.*;
import com.gm.memberShip.menu.business.interfaces.*;  

/**
 * @author  JIANGCHENG
 * @version 1.0
 * @since 1.0
 */


public class ModuleInRoles  implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "ModuleInRoles";
	public static final String ALIAS_USER_ID = "moduleId";
	public static final String ALIAS_ROLE_ID = "roleId";
	public static final String ALIAS_ID = "id";
	
	 
	 
	//columns START
	private java.lang.Integer moduleId;
	private java.lang.Integer roleId;
	private java.lang.Integer id;
	//columns END

	public ModuleInRoles(){
	}

	public ModuleInRoles(
		java.lang.Integer id
	){
		this.id = id;
	} 
		 
	public void setUserId(java.lang.Integer value) {
		this.moduleId = value;
	}
	
	public java.lang.Integer getUserId() {
		return this.moduleId;
	}
		 
	public void setRoleId(java.lang.Integer value) {
		this.roleId = value;
	}
	
	public java.lang.Integer getRoleId() {
		return this.roleId;
	}
		 
	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("UserId",getUserId())
			.append("RoleId",getRoleId())
			.append("Id",getId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof ModuleInRoles == false) return false;
		if(this == obj) return true;
		ModuleInRoles other = (ModuleInRoles)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

